package com.zyh.service;

import com.zyh.Repository.HTableRepository;
import com.zyh.entity.HTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Service
public class HTableService{
    @Autowired
    HTableRepository hTableRepository;

    public HTable save(HTable hTable){
        return hTableRepository.save(hTable);
    }

    public HTable findBySnoAndEnterTime(int sno, Date entertime){
        return hTableRepository.findBySnoAndEnterTime(sno,entertime);
    }

    public List<HTable> findAll(){
        return hTableRepository.findAll();
    }

    public List<HTable> findBySno(int sno) {
        return hTableRepository.findAllBySno(sno);
    }
}
